<!--  列表的结束 -->
<style xmlns="http://www.w3.org/1999/html">
    /*分页*/
    .pagination {
    }

    .pagination li {
        display: inline-block;
        margin-right: -1px;
        padding: 5px 10px;
        margin:  0 2px;
        border: 1px solid #ddd;
        min-width: 20px;
        text-align: center;
        vertical-align: top;
        border-radius: 5px;

    }
    .pagination li.disabled{
        padding: 3px 10px;
    }
    .pagination li.active {
        background: #009688;
        color: #fff;
        border: 1px solid #00a29a;
        padding: 3px 10px;
    }

    .pagination li a {
        display: block;
        text-align: center;
        color: #999;
        width: 100%;
        height: 100%;
    }
</style>

<input value="{$pageurl}" id="turnurl" type="hidden">
<div class="page_btn">
    <div class="center">


        <span class="decration">共{$list->lastPage()}页/{$list->total()}条数据</span>
        <div class="form-group">
{$list->render()}
        </div>
        <strong class="to_new">
            跳至
            <input type="hidden" value="">
            <input type="text" min="1" max="{$list->lastPage()}" id="turnpage" name="turnpage" value="{$list->currentPage()}">
            <!-- <input type="button"> -->
            页<input type="button" id="page-num" onclick="getInputPage()" class="btn btn-danger" value="跳转">
        </strong>


        <!--</form>-->

    </div>
</div>

<script>
    var url =$("#turnurl").val();
    function getInputPage() {
        var page = $("#turnpage").val();
        var page_url = changeURLArg(url, 'page', page);

        location.href = page_url;
    }
    function changeURLArg(url, arg, arg_val) {
        var pattern = arg + '=([^&]*)';
        var replaceText = arg + '=' + arg_val;
        if (url.match(pattern)) {
            var tmp = '/(' + arg + '=)([^&]*)/gi';
            tmp = url.replace(eval(tmp), replaceText);
            return tmp;
        } else {
            if (url.match('[\?]')) {
                return url + '&' + replaceText;
            } else {
                return url + '?' + replaceText;
            }
        }
        return url + '\n' + arg + '\n' + arg_val;
    }</script>